package client;
import java.util.Vector;

public class Message 
{
	public static String createMessage(String header)
	{
		return header;
	}
	public static String createMessage(String header, String arg1)
	{
		return header + Strings.DELIMITER + arg1;
	}
	public static String createMessage(String header, String arg1, String arg2)
	{
		return header + Strings.DELIMITER + arg1 + Strings.DELIMITER + arg2;
	}
	public static String createMessage(String header, String arg1, String arg2, String arg3)
	{
		return header + Strings.DELIMITER + arg1 + Strings.DELIMITER + 
				arg2 + Strings.DELIMITER + arg3;
	}
	public static String createMessage(String header, String arg1, String arg2, String arg3, String arg4)
	{
		return header + Strings.DELIMITER + arg1 + Strings.DELIMITER + 
				arg2 + Strings.DELIMITER + arg3 + Strings.DELIMITER + arg4;
	}
	public static String createMessage(String header, Vector<String> argList)
	{
		String ans = new String();
		ans += header + Strings.DELIMITER;
		for(int i = 0; i < argList.size(); i++) 
		{
			ans += argList.elementAt(i);
			if(i != argList.size()-1) ans += Strings.DELIMITER;
		}
		return ans;
	}
	
	/*
	public static void main(String[] args)
	{
		System.out.println("Testing \0");
		String x = new String("Testing \0");
		if(x.charAt(8) == 0) System.out.println("works");
	}
	*/
}
